#ifndef __PRINTER_H__
#define __PRINTER_H__

typedef int ( *printer_print_func_t )(void *self, const char *msg);

struct printer_i{
	printer_print_func_t print;
};

static inline int print(void *self, const char *msg){
	//struct printer_i *p = *(struct printer_i**)self;
	return (*(struct printer_i**)self)->print(self, msg);
}

#endif /* __PRINTER_H__ */